//引入
const url = require('url');
//调用
var data='http://itcast.cn?name=张三&age=18';

console.log(data);
console.log(url.parse(data));
console.log(url.parse(data,true));
var a=url.parse(data,true);
console.log(a.query);
console.log(a.query.name+a.query.age);
